﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MvcXRepairAdmin.Interfaces;
using MvcXRepairAdmin.Repository.SQL;
using XRepair.Models;

namespace MvcXRepairAdmin.Services
{
    public class SymptomService : ISymptomService
    {
        private SymptomDAO _symptomRepository;

        public SymptomService()
        {
            _symptomRepository = new SymptomDAO();
        }

        public IEnumerable<Symptom> GetAllActiveSymptoms()
        {
            return _symptomRepository.GetAllActiveSymptoms();
        }

        public bool DeactivateSymptomByID(int id)
        {
            return _symptomRepository.DeactivateSymptomByID(id);
        }

        public bool AddNewSymptom(Symptom symptom)
        {
            return _symptomRepository.AddNewSymptom(symptom);
        }

        public bool EditSymptom(Symptom symptom)
        {
            return _symptomRepository.UpdateSymptom(symptom);
        }
    }
}
